<script setup lang="ts">
	import switchTab from "@/common/switchTab";

	const handleTo = () => {
		switchTab({
			url: "pages/mine/index",
			success: function (res) {
				// 通过eventChannel向被打开页面传送数据
				console.log(res, "--home--");
			},
			fail: (fail) => {
				console.log(fail, "1");
			},
			complete: (complete) => {
				console.log(complete, "3");
			},
		});
	};
</script>

<template>
	<view class="w-full h-full flex justify-center flex-col items-center bg-pink-300">
		<nut-animate type="ripple" :loop="true">
			<nut-button type="primary" @click="handleTo">首页 </nut-button>
		</nut-animate>
	</view>
</template>